```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Java IO流详解 | 技术小馆</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=NotoSans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        .flow-icon {
            font-size: 2.5rem;
            color: #667eea;
        }
        .concept-card {
            border-left: 4px solid #667eea;
            transition: all 0.3s ease;
        }
        .concept-card:hover {
            background-color: #f8fafc;
        }
        table {
            border-collapse: separate;
            border-spacing: 0;
            width: 100%;
            overflow: hidden;
            border-radius: 0.5rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }
        th, td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }
        th {
            background-color: #f8fafc;
            font-weight: 600;
        }
        tr:hover td {
            background-color: #f8fafc;
        }
        .diagram-container {
            background-color: #fff;
            border-radius: 0.5rem;
            padding: 1.5rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }
        .first-letter {
            float: left;
            font-size: 3.5rem;
            line-height: 3rem;
            padding-top: 0.5rem;
            padding-right: 0.5rem;
            font-weight: bold;
            color: #667eea;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6 lg:px-16">
            <div class="flex flex-col lg:flex-row items-center">
                <div class="lg:w-1/2 mb-10 lg:mb-0 lg:pr-10">
                    <h1 class="text-4xl md:text-5xl font-bold mb-4">深入理解Java IO流</h1>
                    <p class="text-xl mb-8 opacity-90">探索Java数据流动的核心机制与设计哲学</p>
                    <div class="flex items-center">
                        <div class="w-12 h-12 bg-white bg-opacity-20 rounded-full flex items-center justify-center mr-4">
                            <i class="fas fa-code text-2xl"></i>
                        </div>
                        <p class="text-sm opacity-80">技术小馆 · Java核心概念系列</p>
                    </div>
                </div>
                <div class="lg:w-1/2">
                    <div class="bg-white bg-opacity-10 p-8 rounded-xl backdrop-blur-sm">
                        <div class="flex items-center mb-6">
                            <div class="mr-4">
                                <i class="fas fa-exchange-alt text-3xl"></i>
                            </div>
                            <h3 class="text-2xl font-semibold">数据流动的本质</h3>
                        </div>
                        <p class="mb-6">在Java中，IO流是数据传输的核心抽象。它们如同管道，连接着程序与外部世界，使数据能够有序流动。</p>
                        <div class="flex flex-wrap gap-3">
                            <span class="px-3 py-1 bg-white bg-opacity-20 rounded-full text-sm">输入流</span>
                            <span class="px-3 py-1 bg-white bg-opacity-20 rounded-full text-sm">输出流</span>
                            <span class="px-3 py-1 bg-white bg-opacity-20 rounded-full text-sm">字节流</span>
                            <span class="px-3 py-1 bg-white bg-opacity-20 rounded-full text-sm">字符流</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto px-6 lg:px-16 py-16">
        <!-- Introduction -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-12 h-1 bg-blue-500 mr-4"></div>
                <h2 class="text-2xl font-semibold">IO流基础概念</h2>
            </div>
            <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12">
                <div class="bg-white p-6 rounded-xl shadow-md card-hover transition-all duration-300">
                    <div class="flow-icon mb-4">
                        <i class="fas fa-sign-in-alt"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">输入流与输出流</h3>
                    <p>按数据方向不同可以分为输入流和输出流。输入流和输出流是对程序而言，建立一个路径开始读数据叫做输入流，反之是输出流。</p>
                </div>
                <div class="bg-white p-6 rounded-xl shadow-md card-hover transition-all duration-300">
                    <div class="flow-icon mb-4">
                        <i class="fas fa-binary"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">字节流与字符流</h3>
                    <p>按处理单位不同可以分为字节流（以Stream结尾的都是字节流）和字符流。字节流处理原始二进制数据，字符流处理Unicode字符。</p>
                </div>
                <div class="bg-white p-6 rounded-xl shadow-md card-hover transition-all duration-300">
                    <div class="flow-icon mb-4">
                        <i class="fas fa-layer-group"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">节点流与处理流</h3>
                    <p>按功能不同可以分为节点流和处理流。节点流直接操作数据源，处理流则对现有流进行包装，提供增强功能。</p>
                </div>
            </div>
        </section>

        <!-- IO Class Hierarchy -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-12 h-1 bg-blue-500 mr-4"></div>
                <h2 class="text-2xl font-semibold">IO类的层次结构</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-12">
                <div class="p-6 border-b border-gray-100">
                    <h3 class="text-xl font-semibold mb-4">四大抽象基类</h3>
                    <div class="overflow-x-auto">
                        <table>
                            <thead>
                                <tr>
                                    <th>抽象类</th>
                                    <th>字节流</th>
                                    <th>字符流</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>输入流</td>
                                    <td>InputStream</td>
                                    <td>Reader</td>
                                </tr>
                                <tr>
                                    <td>输出流</td>
                                    <td>OutputStream</td>
                                    <td>Writer</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="concept-card bg-white p-6 rounded-xl shadow-sm">
                    <h3 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-project-diagram mr-3 text-blue-500"></i>
                        节点流
                    </h3>
                    <p>程序的路劲直接指向数据源(可以从一个特定的数据源读写数据)。节点流直接与数据源相连，负责基础的数据读写操作。</p>
                </div>
                <div class="concept-card bg-white p-6 rounded-xl shadow-sm">
                    <h3 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-cogs mr-3 text-blue-500"></i>
                        处理流
                    </h3>
                    <p>链接已存在的流(节点流或处理流)之上，通过对数据的处理为程序提供更为强大的读写功能。处理流通过装饰器模式增强流的功能。</p>
                </div>
            </div>
        </section>

        <!-- Visual Diagrams -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-12 h-1 bg-blue-500 mr-4"></div>
                <h2 class="text-2xl font-semibold">IO流关系图解</h2>
            </div>
            
            <div class="grid lg:grid-cols-2 gap-8 mb-12">
                <div class="diagram-container">
                    <h3 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-sitemap mr-3 text-blue-500"></i>
                        输入输出流分类
                    </h3>
                    <div class="mermaid">
                        graph TD
                            A[IO流] --> B[按方向分]
                            A --> C[按单位分]
                            A --> D[按功能分]
                            B --> B1[输入流]
                            B --> B2[输出流]
                            C --> C1[字节流]
                            C --> C2[字符流]
                            D --> D1[节点流]
                            D --> D2[处理流]
                    </div>
                </div>
                <div class="diagram-container">
                    <h3 class="text-xl font-semibold mb-4 flex items-center">
                        <i class="fas fa-network-wired mr-3 text-blue-500"></i>
                        抽象类关系
                    </h3>
                    <div class="mermaid">
                        classDiagram
                            class InputStream
                            class OutputStream
                            class Reader
                            class Writer
                            
                            InputStream <|-- FileInputStream
                            OutputStream <|-- FileOutputStream
                            Reader <|-- FileReader
                            Writer <|-- FileWriter
                            
                            note for InputStream "字节输入流基类"
                            note for OutputStream "字节输出流基类"
                            note for Reader "字符输入流基类"
                            note for Writer "字符输出流基类"
                    </div>
                </div>
            </div>
            
            <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
                <div class="bg-white p-6 rounded-xl shadow-sm">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-file-export text-blue-500"></i>
                        </div>
                        <h3 class="text-lg font-semibold">OutputStream</h3>
                    </div>
                    <p>所有字节输出流的父类，定义了写入字节的基本方法。核心方法包括write()、flush()和close()。</p>
                </div>
                <div class="bg-white p-6 rounded-xl shadow-sm">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-file-import text-blue-500"></i>
                        </div>
                        <h3 class="text-lg font-semibold">InputStream</h3>
                    </div>
                    <p>所有字节输入流的父类，定义了读取字节的基本方法。核心方法包括read()、available()和close()。</p>
                </div>
                <div class="bg-white p-6 rounded-xl shadow-sm">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-3">
                            <i class="fas fa-font text-blue-500"></i>
                        </div>
                        <h3 class="text-lg font-semibold">Reader/Writer</h3>
                    </div>
                    <p>字符流的基类，与字节流类似但操作的是字符而非字节。提供了更高级的文本处理能力。</p>
                </div>
            </div>
        </section>

        <!-- Practical Example -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="w-12 h-1 bg-blue-500 mr-4"></div>
                <h2 class="text-2xl font-semibold">核心概念详解</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
                <div class="p-8">
                    <div class="flex">
                        <span class="first-letter">节</span>
                        <div>
                            <h3 class="text-xl font-semibold mb-4">节点流的特点与用途</h3>
                            <p class="mb-4">节点流是IO体系中最基础的流类型，它们直接连接到特定的数据源或目的地。常见的节点流包括FileInputStream、FileOutputStream、FileReader和FileWriter等。</p>
                            <p>节点流的特点包括：</p>
                            <ul class="list-disc pl-6 space-y-2 mt-3">
                                <li>直接操作物理存储媒介（如文件、内存、管道等）</li>
                                <li>提供最基本的读写功能</li>
                                <li>通常以物理媒介类型命名（如File、Piped、ByteArray等）</li>
                                <li>性能较好但功能相对简单</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden">
                <div class="p-8">
                    <div class="flex">
                        <span class="first-letter">处</span>
                        <div>
                            <h3 class="text-xl font-semibold mb-4">处理流的优势与应用</h3>
                            <p class="mb-4">处理流通过装饰器模式（Decorator Pattern）对现有的流进行包装，提供增强的功能。常见的处理流包括BufferedInputStream、BufferedReader、DataInputStream等。</p>
                            <p>处理流的优势包括：</p>
                            <ul class="list-disc pl-6 space-y-2 mt-3">
                                <li>提供缓冲功能，提高IO效率</li>
                                <li>实现数据转换（如字节与基本数据类型的转换）</li>
                                <li>支持更复杂的数据处理（如行读取、对象序列化等）</li>
                                <li>可以多层嵌套，组合多种功能</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12">
        <div class="container mx-auto px-6 lg:px-16">
            <div class="flex flex-col items-center">
                <div class="mb-6">
                    <h3 class="text-xl font-semibold text-white mb-2">技术小馆</h3>
                    <p class="text-sm opacity-75">探索编程世界的奥秘</p>
                </div>
                <div class="mb-6">
                    <a href="http://www.yuque.com/jtostring" class="text-blue-400 hover:text-blue-300 transition-colors duration-200" target="_blank">
                        <i class="fas fa-external-link-alt mr-2"></i>
                        www.yuque.com/jtostring
                    </a>
                </div>
                <div class="text-xs opacity-50">
                    © 2023 技术小馆 版权所有
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            },
            classDiagram: {
                useMaxWidth: true
            }
        });
        
        // 微交互效果
        document.querySelectorAll('.card-hover').forEach(card => {
            card.addEventListener('mouseenter', () => {
                card.style.transition = 'transform 0.3s ease, box-shadow 0.3s ease';
            });
        });
    </script>
</body>
</html>
```